With the increasing availability of match film (streams/YouTube/Vimeo/etc.) as well as the growing use of the Advantage system, I often need to quickly and easily download match film from a variety of different sources. The method outlined here involves downloading and installing a few very small programs, but it doesn’t require you to watch anything, operates in the background, and downloads rather quickly. Installation is different on Windows and macOS; both are outlined below. Here’s what I did:
This is a program that uses command-line inputs and can download almost any type of stream I’ve come across, including YouTube, Vimeo, Facebook Live, and UStream (what Infinity Park often uses to broadcast matches).
Click here to download the latest version for Windows.
This is a program that uses command-line inputs to edit, convert, and do a whole bunch of other things to audio and video files. While yt-dlp will do the downloading, FFmpeg will do the trimming of longer videos.
Go to the FFmpeg download page and download the correct version for your operating system. Don’t click the big green “Download” button–you probably want the Windows installer instead.
Go into a folder (I chose C:/Program Files since that’s where my applications live), and create a new folder called “ffmpeg”.
Unzip the FFmpeg files and copy everything in the unzipped folder here.
.../ffmpeg/bin to your PATHThis is the tricky part; again, I only know how to make this work on Windows. Other operating systems might not even have to do this part.
Hit the Windows key and type “cmd” to open the Command Prompt. Type “ffmpeg” and hit enter. If a bunch of information pops up, it’s installed properly. Type “yt-dlp” and hit enter. If it tells you that you need to provide a URL, it’s installed properly.
Ignore that I typed in “youtube-dl” in this picture – we still want “yt-dlp”.
Homebrew is a package manager for macOS. Installing it makes everything else pretty straightforward. To install it, open Terminal by pressing Command+Space, typing “terminal”, and pressing enter. Paste the following into the Terminal prompt and press enter:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
If it asks for your password, enter the password to your computer’s user profile and hit enter. You won’t see the characters as you enter them.
In the Terminal, paste the following:
brew install yt-dlp/taps/yt-dlp
Check that installation was successful by typing yt-dlp and pressing enter. If your error looks like the following, you’re good to go:
In the terminal, paste the following:
brew install ffmpeg
Check that installation was successful by typing ffmpeg and pressing enter. If your error looks like the following, you’re good to go:
Want to download a complete video? That’s super easy now that everything is installed.
Open the Command Prompt/Terminal. Type the following, replacing the URL below with that of your video.
yt-dlp http://www.youtube.com/yourvideo
Done!
This method also works with videos on Facebook, Vimeo, ESPN, NBCSports… the list goes on.
Some videos, especially those that teams post on Vimeo, are password protected. To get at the video, use the argument --video-password after the call to yt-dlp.
yt-dlp https://vimeo.com/188625468 --video-password “Purple Strength”
Sometimes, teams will post match film to YouTube in a series of videos, especially when they pause recording at stoppages. yt-dlp will download all of the videos at once by plugging in the playlist URL.
yt-dlp https://www.youtube.com/playlist?list=TEAMPLAYLIST1234
Unfortunately, these will wind up being completely separate videos. We can add another argument (--concat-playlist always) to have the program join them up for us.
yt-dlp https://www.youtube.com/playlist?list=TEAMPLAYLIST1234 --concat-playlist always
But what if the two videos were not downloaded as a playlist? Things get a little bit less straightforward. We’ll use ffmpeg to combine all of these into one.
Save a .txt file containing the location of each file you’d like to combine in the order you’d like them combined. Make sure each line starts with the word “file”. It should look something like this:
file "desktop/myvideo1.mp4"
file "desktop/myvideo2.mp4"
file "desktop/myvideo2.mp4"
Once this is done, open the Command Prompt (Windows key + “cmd”) or Terminal (Cmd+Space + “terminal”). Type the following, replacing the inputs with that of the text file and what you want to call the resulting video.
ffmpeg -f -safe 0 -i "TEXT FILE" -codec copy "FILE NAME"
Only want part of a multi-hour stream? Figure out where your match starts and ends (hours, minutes, and seconds into the stream).
Bring up the Command Prompt (hit the Windows key and type “cmd”, or CMD+Space+“terminal” in macOS). Type the following:
ffmpeg -ss STARTTIME -i "STREAM URL"" -to ENDTIME -c copy -copyts "FILE NAME"
So, to download a 1 minute section of one of my matches this summer:
ffmpeg -ss 02:06:55.0 -i http://main.soundque.com:1935/vod/USAR08082015f2.mp4/chunklist_w149588290.m3u8 -to 02:07:55.0 -c copy -copyts ob_army_platesemi.mp4
Alternatively, you can list the length of time you’d like to download by dropping -copyts and using -t instead of -to.
ffmpeg -ss 02:06:55.0 -i http://main.soundque.com:1935/vod/USAR08082015f2.mp4/chunklist_w149588290.m3u8 -t 00:01:00.0 -c copy ob_army_platesemi.mp4
Note: this only works if you use the direct file URL. You can get this by typing the following and pasting one of the output URLs into the code above:
yt-dlp -g https://www.youtube.com/thevideoURL
Just to warn you: some streams may take a bit of extra digging, but it’s fast and easy once you know what to look for. Make sure FFmpeg is installed and working before proceeding.
An M3U8 file is what most video players use to load streams, which is why this works. Basically, it points the program to the media file on the website’s servers, which you download directly.
yt-dlp "YOUR ADDRESS"
Downloading FloRugby’s “Shorts Challenge” would look like this:
yt-dlp https://player.ooyala.com/hls/player/all/JhdGZnZzE64_-Mntz-AQIDiATi3mrRPL/media/4000.m3u8
You can combine this with the clipping code above if you only want a section. Place the -ss section before the URL and the -t after.
ffmpeg -ss 00:58 -i "https://player.ooyala.com/hls/player/all/JhdGZnZzE64_-Mntz-AQIDiATi3mrRPL/media/4000.m3u8" -t 00:05 -c copy shorts_clipped.mp4
Sometimes things don’t work as nicely as I hope they would. I’ll keep this section updated with some other tricks.
DRM makes everything tough. Now that Iona and Harvard broadcast their matches through ESPN+, others will probably follow suit. Or, maybe you just want to grab a clip from one of the professional matches for which ESPN has the rights. We’ll need to jump through some hoops to download the ESPN+ content regardless.
Log into ESPN+ and find the video you’d like to download.
In Chrome, right click and select Inspect, then Network as outlined above.
Refresh the page.
Filter for “entitlements”; under “Request Headers” one link will have dss-session-token: followed by a lot of characters. Copy and paste these somewhere.
Filter for “m3u8”, copy the link to the m3u8 of choice.
Run the following, inserting the copied key and m3u8 url:
yt-dlp --add-header "Authorization:**pasteDSSTOKENhere**" "**m3u8URLhere**"